package com.bean.util;

import com.bean.pojo.Dto;

import java.io.Serializable;

public class DtoUtil implements Serializable {

    public static Dto returnSuccess(){
        return new Dto("200","true",null,null);
    }
    public static Dto returnSuccess(String msg){
        return new Dto("200","true",msg,null);
    }
    public static Dto returnSuccess(Object data){
        return new Dto("200","true",null,data);
    }
    public static Dto returnFail(String msg){
        return new Dto("400","false",msg,null);
    }
    public static Dto returnFail(String code,String msg){
        return new Dto(code,"false",msg,null);
    }
}
